// 小程序配置文件，因为是 JS 文件，所以可以执行逻辑

export default {
  pages: [ // pages 作为主包，打开小程序就会默认加载，一般tabbar作为珠宝，其他视情况
    "pages/index/index",
    // "pages/publicActivity/index",
    // "pages/activityDetail/index",


    "pages/message/index",
    "pages/me/index",
  ],
  subpackages: [ // 分包，只有访问这些页面时才会加载资源
    {
      "root": "pages/packageA", // 这个分包的根路径
      "name": 'packageA', // 分包名字
      "pages": [ // 这个分包中的页面路径，其中页面路径为分包根路径的相对路径
        "publicActivity/index",
      ]
    },
    {
      "root": "pages/packageB",
      "name": 'packageB',
      "pages": [
        "activityDetail/index",
      ]
    },
  ],
  preloadRule: { // 分包预下载
    "pages/index/index": { // 访问主页，下载 packageB 包
      "network": "all", // 在指定网络下预下载，可选值为： all: 不限网络 wifi: 仅 wifi 下预下载
      "packages": ["packageB"] // 进入页面后预下载分包的 root 或 name，APP 表示主包
    },
  },
  window: {
    backgroundTextStyle: "light",
    navigationBarBackgroundColor: "#28915b",
    navigationBarTitleText: "户外App",
    navigationBarTextStyle: "white",
    onReachBottomDistance: 20
  },
  tabBar: {
    color: "#707070",
    selectedColor: "#28915b",
    list: [
      {
        pagePath: "pages/index/index",
        text: "首页",
        iconPath: "./assets/images/tabbar/home.png",
        selectedIconPath: "./assets/images/tabbar/home-on.png",
      },
      {
        pagePath: "pages/message/index",
        text: "消息",
        iconPath: "./assets/images/tabbar/message.png",
        selectedIconPath: "./assets/images/tabbar/message-on.png",
      },
      {
        pagePath: "pages/me/index",
        text: "我的",
        iconPath: "./assets/images/tabbar/me.png",
        selectedIconPath: "./assets/images/tabbar/me-on.png",
      },
    ],
  },
  requiredPrivateInfos: ["chooseLocation", "choosePoi"],
};
